package de.unimannheim.ki.usermanagement;

import java.util.List;

import de.unimannheim.ki.servlets.WebServiceClient;

public class FacebookUserHandler  {
	private WebServiceClient wsClient;
	private FacebookSessionHandler apiHandler;


	public FacebookUserHandler() {
		super();
		wsClient = new WebServiceClient();
		apiHandler = new FacebookSessionHandler();
	}
	
	public FbUser getUser(String userid, String accessToken){
		String query = apiHandler.buildQueryString(userid);
		System.out.println(query);
		return apiHandler.doFQLQuery(accessToken, wsClient, query).get(0);
	}
	
	public List<FbUser> getFriendsForLoggedInUser(String accessToken){
		
		 return apiHandler.doFQLQuery(accessToken, wsClient, apiHandler.buildQueryString());
	}

}